home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kate / toolviewmanager.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.7 KB  |  97 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org>
  3.    Copyright (C) 2002 Christoph Cullmann <cullmann@kde.org>
  4.  
  5.    This library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public
  7.    License version 2 as published by the Free Software Foundation.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.    Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public License
  15.    along with this library; see the file COPYING.LIB.  If not, write to
  16.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17.    Boston, MA 02110-1301, USA.
  18. */
  19.  
  20. #ifndef _KATE_TOOLVIEWMANAGER_INCLUDE_
  21. #define _KATE_TOOLVIEWMANAGER_INCLUDE_
  22.  
  23. #include <qwidget.h>
  24. #include <kurl.h>
  25.  
  26. namespace Kate
  27. {
  28.  
  29. /**
  30.   Interface to the toolviewmanager
  31.  */
  32. class KDE_EXPORT ToolViewManager : public QObject
  33. {
  34.   friend class PrivateToolViewManager;
  35.  
  36.   Q_OBJECT
  37.  
  38.   public:
  39.     /**
  40.      * Construtor, should not interest, internal usage
  41.      */
  42.     ToolViewManager (void *toolViewManager);
  43.  
  44.     /**
  45.      * Desctructor
  46.      */
  47.     virtual ~ToolViewManager ();
  48.  
  49.   public:
  50.     /**
  51.      * positions
  52.      */
  53.     enum Position {Left, Right, Top, Bottom};
  54.  
  55.     /**
  56.      * add a given widget to the given sidebar if possible, name is very important
  57.      * @param identifier unique identifier for this toolview
  58.      * @param pos position for the toolview, if we are in session restore, this is only a preference
  59.      * @param icon icon to use for the toolview
  60.      * @param text text to use in addition to icon
  61.      * @return created toolview on success or 0
  62.      */
  63.     QWidget *createToolView (const QString &identifier, ToolViewManager::Position pos, const QPixmap &icon, const QString &text);
  64.  
  65.     /**
  66.      * Move the toolview
  67.      * @param widget to show, widget given must be widget constructed by createToolView
  68.      * @param pos position to move widget to
  69.      * @return bool success
  70.      */
  71.     bool moveToolView (QWidget *widget, ToolViewManager::Position pos);
  72.  
  73.     /**
  74.      * Show the toolview
  75.      * @param widget to show, widget given must be widget constructed by createToolView
  76.      * @return bool success
  77.      */
  78.     bool showToolView (QWidget *widget);
  79.  
  80.     /**
  81.      * Hide the toolview
  82.      * @param widget to hide, widget given must be widget constructed by createToolView
  83.      * @return bool success
  84.      */
  85.     bool hideToolView (QWidget *widget);
  86.  
  87.   private:
  88.     /**
  89.      * REALLY PRIVATE ;)
  90.      */
  91.     class PrivateToolViewManager *d;
  92. };
  93.  
  94. }
  95.  
  96. #endif
  97.